.Net Framework > v3.5.21022.8 > System > Linq > Queryable > SingleOrDefault<TSource> SingleOrDefault<TSource>(IQueryable<TSource>)
SingleOrDefault<TSource>(IQueryable<TSource>,Func<TSource,Boolean>>)


SingleOrDefault<TSource>(IQueryable<TSource>)

Category
Method
Description
Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.
Type
TSource
Character
public, static
Parameters
NameTypeDescription
sourceSystem.Linq.IQueryable<TSource>
Attributes
NameValue/Assignment
ExtensionAttribute
Tags
01892ABD01, 02E3ABA98D, 0322962271

SingleOrDefault<TSource>(IQueryable<TSource>,Func<TSource,Boolean>>)

Category
Method
Description
Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
Type
TSource
Character
public, static
Parameters
NameTypeDescription
sourceSystem.Linq.IQueryable<TSource>
predicateSystem.Linq.Expressions.Expression<System.Func<TSource,Boolean>>
Attributes
NameValue/Assignment
ExtensionAttribute
Tags
01892ABD01, 02E3ABA98D, 0322962271

Software for developers
.Net Components
Delphi Components
Software for Android Developers
More information resources
WinAPI Programmer's Reference
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database